#!/usr/bin/python
# -*- coding: utf-8 -*-
# 曹志强
# 2019.11.20
from django.contrib import admin

from common.export_excel import export_excel


class BaseAdmin(admin.ModelAdmin):
    actions = [export_excel]
    # def has_view_permission(self, request, obj=None):
    #     return True
    #     return super().has_view_permission(request,obj)
    pass
    # def formfield_for_foreignkey(self, db_field, request, **kwargs):
    #     if db_field.name == "role":
    #         kwargs["queryset"] = SystemType.objects.filter(typename='')
    #         return super(BaseAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
